<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>公告管理页面</title>
</head>
<body>
<a th:href="@{/adm/toAddNotice}">添加公告</a><br>
<table>
    <tr>
        <th>公告编号</th>
        <th>公告详情</th>

        <th>操作</th>

    </tr>
    <!--/*@thymesVar id="noticePage" type=""*/-->
    <tr th:each="notice:${noticePage.records}" >
        <td th:text="${notice.getNoticeId()}">Onions</td>
        <td th:text="${notice.getNoticeDetails().substring(0,10)}+...">Onions</td>
        <td>
            <a th:href="@{/adm/deleteNotice(noticeId=${notice.getNoticeId()})}">删除</a>
            <a th:href="@{/adm/toUpdateNotice(noticeId=${notice.getNoticeId()})}">编辑</a>
        </td>
    </tr>
</table>

当前第[[${noticePage.current}]]页 总计 [[${noticePage.pages}]]页
共[[${noticePage.total}]]条记录<br>
<ul>
    <li class="prev disabled"><a
            th:href="@{/adm/checkNotices(pn=${(noticePage.current)-1})}">←
        Previous</a></li>
    <!--                                                ${num == noticePage.current?'active':''}将当前页页数的方框高亮，类似于三目运算-->
    <!--                                                num:${#numbers.sequence(1,5)}显示多少个页码方框,这个例子是显示1到5的页码方框 -->
    <li th:class="${num == noticePage.current?'active':''}"
        th:each="num:${#numbers.sequence(1,5)}">
        <a th:href="@{/adm/checkNotices(pn=${num})}">[[${num}]]</a>
    </li>
    <li class="next"><a
            th:href="@{/adm/checkNotices(pn=${noticePage.pages})}">End </a>
    </li>
    <li class="next"><a
            th:href="@{/adm/checkNotices(pn=${noticePage.current+1})}">Next
        → </a></li>
</ul>
</body>
</html>